<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>查看运单</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../plugins/layui/css/layui.css" media="all" />
    <link rel="stylesheet" href="../plugins/layui/css/myPage.css"/>

</head>
<body  >
<div class="layui-container">


    <form class="layui-form">
        <div class="layui-row">
            <div class="layui-col-md12">

                <fieldset class="layui-elem-field" style="margin-top: 20px;">
                    <legend>运单信息</legend>


                    <div class="layui-form-item">
                        <label class="layui-form-label" style="width: 90px"><span style="color: red;">*</span>运单号 </label>
                        <div class="layui-input-inline" style="width: 150px;">
                            <input   type="text" name="ydh"  required lay-verify="required" placeholder="请输入"  class="layui-input" id="ydh" >

                            <input   type="hidden" name="ydid"  >
                            <input   type="hidden" name="sfcz" value="1"  >
                            <input   type="hidden" name="sfscdd" value="1"  >
                        </div>


                        <label class="layui-form-label" style="width: 100px"><span style="color: red;">*</span>运单日期 </label>
                        <div class="layui-input-inline" style="width: 150px;">
                            <input   type="text" name="ydrq"  required lay-verify="required" placeholder="请输入"  class="layui-input"  >
                        </div>

                        <div class="layui-inline">
                            <label class="layui-form-label" style="width: 73px" ><span style="color: red;">*</span>运单状态</label>
                            <div class="layui-input-inline" style="width: 150px;">
                                <select name="ydzt" required lay-verify="required" id="ydzt"  >
                                    <option value=""></option>
                                    <option value="待调度">待调度</option>
                                    <option value="待发车">待发车</option>
                                    <option value="已发车">已发车</option>
                                    <option value="已回车">已回车</option>
                                    <option value="已完成">已完成</option>
                                    <option value="审核中">审核中</option>
                                    <option value="快捷_已报" >已报</option>
                                </select>
                            </div>
                        </div>

                        <div class="layui-inline">
                            <label class="layui-form-label" style="width:69px"><span style="color: red;">*</span>客户简称</label>
                            <div class="layui-input-inline" style="width: 150px;">
                                <input type="text" name="khjc" required lay-verify="required" placeholder="请输入"  class="layui-input">
                                <input type="hidden" name="khid"  >
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">

                        <label class="layui-form-label"><span style="color: red;">*</span>区域名称</label>
                        <div class="layui-input-inline" style="width: 150px;">
                            <input   type="text" name="qymc"  required lay-verify="required" placeholder="请输入"  class="layui-input"  >
                            <input type="hidden" name="qyid"  >
                        </div>

                        <label class="layui-form-label" style="width: 99px"><span style="color: red;">*</span>线路名称</label>
                        <div class="layui-input-inline" style="width: 423px;">
                            <input   type="text" name="xlmc"  required lay-verify="required" placeholder="请输入"  class="layui-input"  >
                            <input type="hidden" name="xlid"  >
                        </div>




                        <label class="layui-form-label" style="width: 75px">货物</label>
                        <div class="layui-input-inline" style="width: 150px;">
                            <input   type="text" name="huowu"      class="layui-input" id="huowu" >
                        </div>

                    </div>
                    <div class="layui-form-item">




                        <div class="layui-inline">
                            <label class="layui-form-label" >货物数量</label>
                            <div class="layui-input-inline" style="width: 150px;">
                                <input   type="text" name="hwsl"      class="layui-input" id="hwsl"  >
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label" style="width: 85px">运费</label>
                            <div class="layui-input-inline" style="width: 150px;">
                                <input   type="text" name="yunfei"     class="layui-input" id="yunfei" >
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label" style="width: 61px">公里数</label>
                            <div class="layui-input-inline" style="width: 150px;">
                                <input type="text" name="gls" class="layui-input" id="gls" >
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label" style="width: 70px">油单价</label>
                            <div class="layui-input-inline" style="width: 150px;">
                                <input type="text" name="ydj" class="layui-input" id="ydj" >
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">

                        <div class="layui-inline">
                            <label class="layui-form-label" >车牌号</label>
                            <div class="layui-input-inline" style="width: 150px;">
                                <input   type="text" name="cph"      class="layui-input" id="cph"  >
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label" style="width: 85px">车辆类型</label>
                            <div class="layui-input-inline" style="width: 150px;">
                                <input   type="text" name="cllx"     class="layui-input" id="cllx" >
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label" style="width: 61px">驾驶员</label>
                            <div class="layui-input-inline" style="width: 150px;">
                                <input type="text" name="jsyxm" class="layui-input" id="jsy" >
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label" style="width: 70px">驾驶员手机</label>
                            <div class="layui-input-inline" style="width: 150px;">
                                <input type="text" name="jsysj" class="layui-input" id="jsysj" >
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">


                        <div class="layui-inline">
                            <label class="layui-form-label" style="width: 90px">百公里油耗</label>
                            <div class="layui-input-inline" style="width: 150px;">
                                <input   type="text" name="bglyh"     class="layui-input" id="bglyh" >
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label" style="width: 85px">理论充油金额</label>
                            <div class="layui-input-inline" style="width: 150px;">
                                <input type="text" name="llcyje" class="layui-input" id="llcyje" >
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label" style="width: 62px">发车日期</label>
                            <div class="layui-input-inline" style="width: 150px;">
                                <input type="text" name="fcrq" class="layui-input" id="fcrq" >
                            </div>
                        </div>

                        <div class="layui-inline">
                            <label class="layui-form-label" style="width: 69px" >类型</label>
                            <div class="layui-input-inline" style="width: 150px;">
                                <select name="leixing"   id="leixing"  >
                                    <option value=""></option>
                                    <option value="带货">带货</option>
                                    <option value="放空">放空</option>
                                    <option value="来回">来回</option>
                                    <option value="套跑">套跑</option>
                                    <option value="公司配货">公司配货</option>
                                </select>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">

                        <div class="layui-inline">
                            <label class="layui-form-label" style="width: 90px" >速通卡</label>
                            <div class="layui-input-inline" style="width: 150px;">
                                <input type="text" name="stk" class="layui-input" id="stk" >
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label" style="width: 600px">注：理论充油金额=油单价（元/L）×百公里油耗（L/百公里）×公里数（公里）</label>
                    </div>

                </fieldset>
            </div>
        </div>

        <div class="layui-row">
            <div class="layui-col-md12">

                <fieldset class="layui-elem-field" style="margin-top: 20px;">
                    <legend>回车登记</legend>


                    <div class="layui-form-item">



                        <label class="layui-form-label" style=""> 回车日期 </label>
                        <div class="layui-input-inline" style="width: 150px;">
                            <input   type="text" name="hcrq"    placeholder="请输入"  class="layui-input" id="hcrq" >
                            <input   type="hidden" name="ydid"  >
                            <input   type="hidden" name="ydh"  >
                        </div>

                        <label class="layui-form-label" style="width: 90px" >收货方 </label>
                        <div class="layui-input-inline" style="width: 150px;">
                            <input   type="text" name="shf"    placeholder="请输入"  class="layui-input"  id="shf">
                        </div>
                        <label class="layui-form-label" style="width: 75px" >回单号</label>
                        <div class="layui-input-inline" style="width: 150px;">
                            <input   type="text" name="hdh"    placeholder="请输入"  class="layui-input"  id="hdh">
                        </div>

                    </div>
                    <div class="layui-form-item">

                        <label class="layui-form-label">实发量</label>
                        <div class="layui-input-inline" style="width: 150px;">
                            <input   type="text" name="sfl"    placeholder="请输入"  class="layui-input"  id="sfl">
                        </div>

                        <label class="layui-form-label"  >实收量</label>
                        <div class="layui-input-inline" style="width: 150px;">
                            <input   type="text" name="hcssl"   placeholder="请输入"  class="layui-input" id="ssl" >

                        </div>

                        <label class="layui-form-label" style="width: 75px">实际运费</label>
                        <div class="layui-input-inline" style="width: 150px;">
                            <input   type="text" name="sjyf"   placeholder="请输入"   class="layui-input" id="sjyf" >
                        </div>

                        <label class="layui-form-label" style="width: 75px">损耗金额</label>
                        <div class="layui-input-inline" style="width: 150px;">
                            <input   type="text" name="shje"   placeholder="请输入"   class="layui-input" id="shje" >
                        </div>

                    </div>
                    <div class="layui-form-item">




                        <div class="layui-inline">
                            <label class="layui-form-label" >代垫费</label>
                            <div class="layui-input-inline" style="width: 150px;">
                                <input   type="text" name="ddf"      class="layui-input"  placeholder="请输入" id="ddf">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label" style="width: 78px">实际公里数</label>
                            <div class="layui-input-inline" style="width: 150px;">
                                <input   type="text" name="sjgls"     class="layui-input" placeholder="请输入"  id="sjgls">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label" style="width: 61px">应收金额</label>
                            <div class="layui-input-inline" style="width: 150px;">
                                <input type="gls" name="ysje" class="layui-input" placeholder="请输入" id="ysje" >
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label" style="width: 60px">实收金额</label>
                            <div class="layui-input-inline" style="width: 150px;">
                                <input type="text" name="ssje" class="layui-input" placeholder="请输入"  id="ssje">
                            </div>
                        </div>
                    </div>



                    <div class="layui-form-item">

                        <div class="layui-inline">
                            <label class="layui-form-label" >回单照片</label>
                            <input type="hidden" name="hdzp" autocomplete="off" class="layui-input" id="hdzp">

                            <button type="button" class="layui-btn layui-btn-normal  " style="display: none"  id="hdzpBtn"  >上传文件</button>
                            <button type="button" class="layui-btn layui-btn-normal  "   id="lookhdzpBtn" style="display: none">查看文件</button>

                            <button type="button" class="layui-btn layui-btn-normal  "  style="display: none" id="delhdzpBtn">删除文件</button>

                        </div>

                    </div>
                    <div class="layui-form-item"  >

                        <div class="layui-inline">
                            <label class="layui-form-label" style="width: 90px" >是否准点</label>
                            <div class="layui-input-inline" style="width: 95px;">
                                <select name="sfzd"  id="sfzd"  lay-filter="sfzd" >
                                    <option value=""></option>
                                    <option value="是">是</option>
                                    <option value="否">否</option>
                                </select>
                            </div>
                        </div>

                    </div>
                    <div class="layui-form-item" style="display: none" id="latePhoto" >

                        <div class="layui-inline">
                            <label class="layui-form-label" >晚点照片</label>
                            <input type="hidden" name="wdzp" autocomplete="off" class="layui-input" id="wdzp">

                            <button type="button" class="layui-btn layui-btn-normal  "  style="display: none" id="wdzpBtn"  >上传文件</button>
                            <button type="button" class="layui-btn layui-btn-normal  "   id="lookwdzpBtn" style="display: none">查看文件</button>

                            <button type="button" class="layui-btn layui-btn-normal  "  style="display: none" id="delwdzpBtn">删除文件</button>

                        </div>

                    </div>


                </fieldset>
            </div>


        </div>



        <div class="layui-row">
            <div class="layui-col-md12">

                <fieldset class="layui-elem-field" style="margin-top: 20px;">
                    <legend>报账信息</legend>





                    <div class="layui-form-item">


                        <label class="layui-form-label" style=""> 报账日期 </label>
                        <div class="layui-input-inline" style="width: 150px;">
                            <input   type="text" name="bzrq"    placeholder="请输入"  class="layui-input" id="bzrq" >
                            <input   type="hidden" name="ydid"  >
                        </div>

                        <div class="layui-inline">
                            <label class="layui-form-label" style="width: 74px" > 充油卡</label>
                            <input   type="hidden" name="ydh"  >
                            <div class="layui-input-inline" style="width: 150px;">
                                <select name="cyk"    id="cyk" lay-filter="cyk" >
                                    <option value="固定卡">固定卡</option>
                                    <option value="备用卡">备用卡</option>
                                </select>
                            </div>
                        </div>

                        <div class="layui-inline" id="ykhSelect">
                            <label class="layui-form-label" style="width: 60px"> 油卡号 </label>
                            <div class="layui-input-inline" style="width: 150px;">

                                <input type="hidden" name="ykid" id="ykidValue" >
                                <select  name="ykid"   lay-search class="layui-input"   id="ykid" >
                                    <option value=""></option>
                                </select>
                            </div>
                        </div>

                        <div class="layui-inline" id="ykhInput" style="display: none">
                            <label class="layui-form-label" style="width: 60px"> 油卡号 </label>
                            <div class="layui-input-inline" style="width: 150px;">
                                <input   type="text" name="byykh"    placeholder="请输入"  class="layui-input" id="byykh" >

                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label" style="width: 90px;">实际充油金额</label>
                            <div class="layui-input-inline" style="width: 150px;">
                                <input   type="text" name="sjcyje"    placeholder="请输入"  class="layui-input" id="sjcyje" >

                            </div>
                        </div>

                    </div>
                    <fieldset class="layui-elem-field layui-field-title " style="margin-top: 20px;">
                        <legend>收入项</legend>
                    </fieldset>


                    <div class="layui-form-item">

                        <label class="layui-form-label">其他</label>
                        <div class="layui-input-inline" style="width: 150px;">
                            <input   type="text" name="srqt"    placeholder="请输入"  class="layui-input"  id="srqt">
                        </div>

                        <label class="layui-form-label"  >回货</label>
                        <div class="layui-input-inline" style="width: 150px;">
                            <input   type="text" name="huihuo"   placeholder="请输入"  class="layui-input" id="huihuo" >

                        </div>
                        <label class="layui-form-label" style="width: 70px" >回货补回</label>
                        <div class="layui-input-inline" style="width: 150px;">
                            <input   type="text" name="hhbh"   placeholder="请输入"  class="layui-input" id="hhbh" >

                        </div>

                        <label class="layui-form-label" style="width: 75px">运费</label>
                        <div class="layui-input-inline" style="width: 150px;">
                            <input   type="text" name="sryf"   placeholder="请输入"   class="layui-input" id="sryf" >
                        </div>



                    </div>
                    <div class="layui-form-item">




                        <div class="layui-inline">
                            <label class="layui-form-label" >总收入</label>
                            <div class="layui-input-inline" style="width: 150px;">
                                <input   type="text" name="zsr"      class="layui-input"  placeholder="请输入" id="zsr">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label" style="width: 78px">备注</label>
                            <div class="layui-input-inline" style="width: 690px;">
                                <input   type="text" name="srbz"     class="layui-input" placeholder="请输入"  id="srbz">
                            </div>
                        </div>

                    </div>
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label" >油卡</label>
                            <div class="layui-input-inline" style="width: 150px;">
                                <input   type="text" name="sryk"      class="layui-input"  placeholder="请输入" id="sryk">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label" style="width: 78px;" >超油</label>
                            <div class="layui-input-inline" style="width: 150px;">
                                <input   type="text" name="srcy"     class="layui-input" placeholder="请输入"  id="srcy">
                            </div>
                        </div>
                    </div>

                    <fieldset class="layui-elem-field layui-field-title " style="margin-top: 20px;">
                        <legend>支出项</legend>
                    </fieldset>
                    <div class="layui-form-item">




                        <div class="layui-inline">
                            <label class="layui-form-label" >过路费</label>
                            <div class="layui-input-inline" style="width: 150px;">
                                <input   type="text" name="glf"      class="layui-input"  placeholder="请输入" id="glf">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label" style="width: 78px">现金加油</label>
                            <div class="layui-input-inline" style="width: 150px;">
                                <input   type="text" name="xjjy"     class="layui-input" placeholder="请输入"  id="xjjy">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label" style="width: 61px">线路补助</label>
                            <div class="layui-input-inline" style="width: 150px;">
                                <input type="text" name="buzhu" class="layui-input" placeholder="请输入" id="buzhu" >
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label" style="width: 60px">买单</label>
                            <div class="layui-input-inline" style="width: 150px;">
                                <input type="text" name="maidan" class="layui-input" placeholder="请输入"  id="maidan">
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">




                        <div class="layui-inline">
                            <label class="layui-form-label" >事故处理</label>
                            <div class="layui-input-inline" style="width: 150px;">
                                <input   type="text" name="sgcl"      class="layui-input"  placeholder="请输入" id="sgcl">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label" style="width: 78px">停车费</label>
                            <div class="layui-input-inline" style="width: 150px;">
                                <input   type="text" name="tcf"     class="layui-input" placeholder="请输入"  id="tcf">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label" style="width: 61px">住宿费</label>
                            <div class="layui-input-inline" style="width: 150px;">
                                <input type="gls" name="zsf" class="layui-input" placeholder="请输入" id="zsf" >
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label" style="width: 60px">装卸费</label>
                            <div class="layui-input-inline" style="width: 150px;">
                                <input type="text" name="zxf" class="layui-input" placeholder="请输入"  id="zxf">
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">




                        <div class="layui-inline">
                            <label class="layui-form-label" >船票</label>
                            <div class="layui-input-inline" style="width: 150px;">
                                <input   type="text" name="chuanpiao"      class="layui-input"  placeholder="请输入" id="chuanpiao">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label" style="width: 78px">违章罚款</label>
                            <div class="layui-input-inline" style="width: 150px;">
                                <input   type="text" name="wzfk"     class="layui-input" placeholder="请输入"  id="wzfk">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label" style="width: 61px">配件</label>
                            <div class="layui-input-inline" style="width: 150px;">
                                <input type="gls" name="peijian" class="layui-input" placeholder="请输入" id="peijian" >
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label" style="width: 60px">其他</label>
                            <div class="layui-input-inline" style="width: 150px;">
                                <input type="text" name="zcqt" class="layui-input" placeholder="请输入"  id="zcqt">
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">




                        <div class="layui-inline">
                            <label class="layui-form-label" style="width: 100px">维修费用(场内)</label>
                            <div class="layui-input-inline" style="width: 150px;">
                                <input   type="text" name="wxfycn"      class="layui-input"  placeholder="请输入" id="wxfycn">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label" style="width: 100px">维修费用(场外)</label>
                            <div class="layui-input-inline" style="width: 150px;">
                                <input   type="text" name="wxfycw"     class="layui-input" placeholder="请输入"  id="wxfycw">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label" style="width: 61px">支出上限</label>
                            <div class="layui-input-inline" style="width: 150px;">
                                <input type="gls" name="zcsx" class="layui-input" lay-verify="mymoney" placeholder="请输入" id="zcsx" >
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label" style="width: 60px">总支出</label>
                            <div class="layui-input-inline" style="width: 150px;">
                                <input type="text" name="zzc" class="layui-input" placeholder="请输入"  id="zzc">
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">

                        <div class="layui-inline">
                            <div class="layui-inline">
                                <label class="layui-form-label" style="width: 92px">备注</label>
                                <div class="layui-input-inline" style="width: 713px;">
                                    <input   type="text" name="zcbz"     class="layui-input" placeholder="请输入"  id="zcbz">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label" style="width: 65px">节油</label>
                                <div class="layui-input-inline" style="width: 150px;">
                                    <input   type="text" name="zcjy"     class="layui-input" placeholder="请输入"  id="zcjy">
                                </div>
                            </div>

                    </div>

                </fieldset>
            </div>


        </div>

        <!--<button id="modiSub" class="layui-btn layui-btn-normal layui-btn-disabled" disabled="disabled" lay-submit lay-filter="update" style="width: 10%; position: absolute;left: 45%"  >立即提交</button>-->
    </form>
</div>

<script src="../plugins/layui/layui.js"></script>

<script src="../js/config.js"></script>
<script src="../js/tools.js"></script>

<script>

    layui.use(['table','form','layer','laydate','upload','jquery' ],function () {

        var $ = layui.$;
        var form = layui.form;
        var laydate = layui.laydate;

        $(".layui-input").addClass("layui-disabled");
        $(".layui-input").attr("disabled",true);
        $("select").attr("disabled","disabled");
//校验
        judgment($,"zcsx",/^([1-9]\d*|0)(\.\d{1,2})?$/,"请输入整数或小数");
        //判断是不是已经回单
        console.log($("#ydzt").val());
        // if($("#ydzt").val() != "已完成" && $("#ydzt").val() != "审核中") {
        //     $("#ykh,#srqt,#ykh,#cyk,#srqt,#huihuo,#hhbh,#sryf,#zsr,#srbz,#glf,#xjjy,#buzhu,#maidan,#sgcl,#tcf,#zsf,#zxf,#chuanpiao,#wzfk,#peijian,#zcqt,#wxfycn,#wxfycw,#zcsx,#zzc,#zcbz").attr("disabled",false);
        //
        //     $("#ykh,#srqt,#ykh,#cyk,#srqt,#huihuo,#hhbh,#sryf,#zsr,#srbz,#glf,#xjjy,#buzhu,#maidan,#sgcl,#tcf,#zsf,#zxf,#chuanpiao,#wzfk,#peijian,#zcqt,#wxfycn,#wxfycw,#zcsx,#zzc,#zcbz").removeClass("layui-disabled");
        //     $("#modiSub").removeClass("layui-btn-disabled");
        //     $("#modiSub").attr("disabled",false);
        // }

        //选择油卡
        form.on('select(cyk)',function (data) {
            if(data.value == "固定卡"){
                $("#ykhSelect").show();
                $("#ykhInput").hide();
            }else {
                $("#ykhInput").show();
                $("#ykhSelect").hide();
            }
        });
        //判断油卡类型
        if($("#cyk").val() == "固定卡"){
            $("#ykhSelect").show();
            $("#ykhInput").hide();
        }else {
            $("#ykhInput").show();
            $("#ykhSelect").hide();
        }
        //渲染油卡号

        $.ajax({
            url: contextPath+"/oilcard",
            type: "GET",
            contentType:"application/json;charset=utf-8",
            dataType:"json",
            success: function(res) {
                for(var i in res.list){
                    if(res.list[i].ykid  == $("#ykidValue").val()){
                        var option = "<option selected value='"+ res.list[i].ykid+ "'>"+res.list[i].ykh+"</option>";
                    }else {
                        var option = "<option value='"+ res.list[i].ykid+ "'>"+res.list[i].ykh+"</option>";
                    }
                    $("#ykid").append(option);
                };
                form.render('select');
            }
        });

        //是否准点
        form.on('select(sfzd)',function (data) {
            if(data.value == "否"){
                $("#latePhoto").show();
            }else {
                $("#latePhoto").hide();
            }
        });
        //准点判断

        if($("#sfzd").val() == "否"){
            $("#latePhoto").show();
        }else {
            $("#latePhoto").hide();
        }
        //重新渲染 select
        form.render('select');

        laydate.render({
            elem: '#bzrq' //指定元素
            ,theme:'#0099FF'
            ,value: getFormatDate()
            ,type: 'date'
            ,format:'yyyy-MM-dd'
        });
        //算收入
        //所有空取0
        $("#srqt,#huihuo,#hhbh,#sryf,#zsr,#glf,#xjjy,#buzhu,#maidan,#sgcl,#tcf,#zsf,#zxf,#chuanpiao,#wzfk,#peijian,#zcqt,#wxfycn,#wxfycw,#zzc,#zcqt").val(0);

        getSumII($,["srqt","huihuo","hhbh","sryf"],"zsr");
        getSumII($,["glf","xjjy","buzhu","maidan","sgcl","tcf","zsf","zxf","chuanpiao","wzfk","peijian","zcqt","wxfycn","wxfycw"],"zzc");
//查看照片
        checkFileB($,$("#hdzp").val(),"hdzp",false,false);
        checkFileB($,$("#wdzp").val(),"wdzp",false,false);
        lookFile($,layer,"hdzp");
        lookFile($,layer,"wdzp");

//提交
        form.on('submit(update)', function(data){
            $("input").css("border","");
            console.log(data.field);
            $.ajax({
                url: contextPath+"/account",
                type: "POST",
                contentType:"application/json;charset=utf-8",
                data: JSON.stringify(data.field) ,
                dataType:"json",
                success: function(res) {
                    updateSuccess($,layer,res)
                }
            });
            return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
        });




    });

</script>
</body>
</html>